<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;

class Message extends Model
{
    use HasDateTimeFormatter, SoftDeletes;

    protected $fillable = ['user_id', 'content', 'read'];


    //用户
    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }



}
